<?php

namespace Caisse\CaisseBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Commande
 *
 * @ORM\Table()
 * @ORM\Entity
 */
class Commande
{
        /**
     * @ORM\ManyToOne(targetEntity="Caisse\CaisseBundle\Entity\Tables", inversedBy="commandes")
   
     */
    private $table;
         /**
     * @ORM\OneToMany(targetEntity="Caisse\CaisseBundle\Entity\ArticleCommande", mappedBy="commande")
     */
    private $ligneCommandes;
    
        /**
     * @ORM\ManyToOne(targetEntity="Caisse\CaisseBundle\Entity\Serveur", inversedBy="commandes")
   
     */
    private $serveur;
    
            /**
     * @ORM\ManyToOne(targetEntity="Caisse\CaisseBundle\Entity\SessionCaisse", inversedBy="commandes")
   
     */
    private $sessionCaisse;
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="date", type="datetime")
     */
    private $date;



    /**
     * @var integer
     *
     * @ORM\Column(name="numCde", type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $numCde;
      /**
     * @var integer
     *
     * @ORM\Column(name="is_payed", type="integer")
     */
    private $is_payed;

    /**
     * @var float
     *
     * @ORM\Column(name="prixTotal", type="float")
     */
    private $prixTotal;


    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set date
     *
     * @param \DateTime $date
     * @return Commande
     */
    public function setDate($date)
    {
        $this->date = $date;
    
        return $this;
    }

    /**
     * Get date
     *
     * @return \DateTime 
     */
    public function getDate()
    {
        return $this->date;
    }


    /**
     * Set numCde
     *
     * @param integer $numCde
     * @return Commande
     */
    public function setNumCde($numCde)
    {
        $this->numCde = $numCde;
    
        return $this;
    }

    /**
     * Get numCde
     *
     * @return integer 
     */
    public function getNumCde()
    {
        return $this->numCde;
    }

    /**
     * Set prixTotal
     *
     * @param float $prixTotal
     * @return Commande
     */
    public function setPrixTotal($prixTotal)
    {
        $this->prixTotal = $prixTotal;
    
        return $this;
    }

    /**
     * Get prixTotal
     *
     * @return float 
     */
    public function getPrixTotal()
    {
        return $this->prixTotal;
    }

    /**
     * Set typePayment
     *
     * @param string $typePayment
     * @return Commande
     */
    public function setTypePayment($typePayment)
    {
        $this->typePayment = $typePayment;
    
        return $this;
    }

    /**
     * Get typePayment
     *
     * @return string 
     */
    public function getTypePayment()
    {
        return $this->typePayment;
    }
    /**
     * Constructor
     */
    public function __construct()
    {
        $this->ligneCommandes = new \Doctrine\Common\Collections\ArrayCollection();
         $this->is_payed = 0;
    }
    
    /**
     * Add ligneCommandes
     *
     * @param \Caisse\CaisseBundle\Entity\ArticleCommande $ligneCommandes
     * @return Commande
     */
    public function addLigneCommande(\Caisse\CaisseBundle\Entity\ArticleCommande $ligneCommandes)
    {
        $this->ligneCommandes[] = $ligneCommandes;
    
        return $this;
    }

    /**
     * Remove ligneCommandes
     *
     * @param \Caisse\CaisseBundle\Entity\ArticleCommande $ligneCommandes
     */
    public function removeLigneCommande(\Caisse\CaisseBundle\Entity\ArticleCommande $ligneCommandes)
    {
        $this->ligneCommandes->removeElement($ligneCommandes);
    }

    /**
     * Get ligneCommandes
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getLigneCommandes()
    {
        return $this->ligneCommandes;
    }

    /**
     * Set serveur
     *
     * @param \Caisse\CaisseBundle\Entity\Serveur $serveur
     * @return Commande
     */
    public function setServeur(\Caisse\CaisseBundle\Entity\Serveur $serveur = null)
    {
        $this->serveur = $serveur;
    
        return $this;
    }

    /**
     * Get serveur
     *
     * @return \Caisse\CaisseBundle\Entity\Serveur 
     */
    public function getServeur()
    {
        return $this->serveur;
    }

    /**
     * Set sessionCaisse
     *
     * @param \Caisse\CaisseBundle\Entity\SessionCaisse $sessionCaisse
     * @return Commande
     */
    public function setSessionCaisse(\Caisse\CaisseBundle\Entity\SessionCaisse $sessionCaisse = null)
    {
        $this->sessionCaisse = $sessionCaisse;
    
        return $this;
    }

    /**
     * Get sessionCaisse
     *
     * @return \Caisse\CaisseBundle\Entity\SessionCaisse 
     */
    public function getSessionCaisse()
    {
        return $this->sessionCaisse;
    }

    /**
     * Set table
     *
     * @param \Caisse\CaisseBundle\Entity\Tables $table
     * @return Commande
     */
    public function setTable(\Caisse\CaisseBundle\Entity\Tables $table = null)
    {
        $this->table = $table;
    
        return $this;
    }

    /**
     * Get table
     *
     * @return \Caisse\CaisseBundle\Entity\Tables 
     */
    public function getTable()
    {
        return $this->table;
    }

    /**
     * Set is_payed
     *
     * @param integer $isPayed
     * @return Commande
     */
    public function setIsPayed($isPayed)
    {
        $this->is_payed = $isPayed;
    
        return $this;
    }

    /**
     * Get is_payed
     *
     * @return integer 
     */
    public function getIsPayed()
    {
        return $this->is_payed;
    }
   
 
}